package com.oj.judge.controller;

import com.github.dockerjava.api.DockerClient;
import com.oj.api.domain.dto.JudgeSubmitDTO;
import com.oj.api.domain.vo.UserQuestionResultVO;
import com.oj.common.core.domain.R;
import com.oj.judge.service.IJudgeService;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

/**
 * @Description
 * @Author bin
 * @Date 2025/6/30
 */
@RestController
@RequestMapping("/judge")
public class JudgeController {

    @Resource
    private IJudgeService judgeService;

    @PostMapping("/doJudgeJavaCode")
    public R<UserQuestionResultVO> doJudgeJavaCode(@RequestBody JudgeSubmitDTO judgeSubmitDTO){
        return R.ok(judgeService.doJudgeJavaCode(judgeSubmitDTO));
    }

}
